package net.borlis.sample.services.facade.ws.response;

import net.borlis.sample.service.entities.lifecycle.dictionary.LifecycleActionType;
import org.apache.commons.lang.builder.ToStringBuilder;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author alex@borlis.net on 19.06.2014.
 */
@XmlRootElement
public class LifecycleEventResponse {

    private LifecycleActionType eventType;
    private Long eventDate;
    private String user;

    public LifecycleEventResponse() {
    }

    public LifecycleEventResponse(LifecycleActionType actionType,
                                  long time, String user) {
        this.eventType = actionType;
        this.eventDate = time;
        this.user = user;
    }

    @XmlElement
    public LifecycleActionType getEventType() {
        return eventType;
    }

    @XmlElement
    public Long getEventDate() {
        return eventDate;
    }

    @XmlElement
    public String getUser() {
        return user;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this).
                append("actionType", eventType).
                append("eventDate", eventDate).
                append("user", user).
                toString();
    }
}
